package com.iotechn.unimall.data.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.iotechn.unimall.data.domain.UserNoticeDO;
import com.iotechn.unimall.data.dto.UserNoticeCountDTO;
import org.apache.ibatis.annotations.Param;

/**
 * Created by rize on 2019/7/4.
 */
public interface UserNoticeMapper extends BaseMapper<UserNoticeDO> {

    public UserNoticeCountDTO selectUnreadCountByUserId(@Param("userId") Long userId);

    public UserNoticeCountDTO selectUnreadCountByShopId(@Param("shopId") Long shopId);

    public Boolean updateIsRead(@Param("id") Long id);

    public Boolean updateIsReadAll(@Param("userId") Long userId);

    public Boolean updateIsReadAllByShopId(@Param("shopId") Long shopId);
}
